package gms

import (
	"net/http"
)

func ListenAndServe(addr string, route *Route) error {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		onHandle(route, w, r)
	})
	return http.ListenAndServe(addr, nil)
}
